package com.wenzhi.studentservice.aopuse;

import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.stereotype.Component;

@Component // 这个不能没有，要不报错
@EnableAspectJAutoProxy // 没有也不报错
public class CalImpl implements Cal {
    @Override
    public int add(int a, int b) {
        // System.out.println("add的参数是：" + a + "," + b);
        int result = a + b;
        // System.out.println("add的结果是：" + result);
        return result;
    }

    @Override
    public int sub(int a, int b) {
        // System.out.println("sub的参数是：" + a + "," + b);
        int result = a - b;
        // System.out.println("sub的结果是：" + result);
        return result;
    }
}
